<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/activeqt/container/qaxobject.cpp -->
<head>
  <title>Qt 4.3: QAxObject Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QAxObject Class Reference<br /><sup><sup>[<a href="qaxcontainer.html">QAxContainer</a> module]</sup></sup></h1>
<p>The QAxObject class provides a <a href="qobject.html">QObject</a> that wraps a COM object. <a href="#details">More...</a></p>
<pre> #include &lt;QAxObject&gt;</pre><p>Inherits <a href="qobject.html">QObject</a> and <a href="qaxbase.html">QAxBase</a>.</p>
<p>Inherited by <a href="qaxscriptengine.html">QAxScriptEngine</a>.</p>
<ul>
<li><a href="qaxobject-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qaxobject.html#QAxObject">QAxObject</a></b> ( QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qaxobject.html#QAxObject-2">QAxObject</a></b> ( const QString &amp; <i>c</i>, QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qaxobject.html#QAxObject-3">QAxObject</a></b> ( IUnknown * <i>iface</i>, QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qaxobject.html#dtor.QAxObject">~QAxObject</a></b> ()</li>
<li><div class="fn"/>bool <b><a href="qaxobject.html#doVerb">doVerb</a></b> ( const QString &amp; <i>verb</i> )</li>
</ul>
<ul>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div class="fn"/>19 public functions inherited from <a href="qaxbase.html#public-functions">QAxBase</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"/>1 property inherited from <a href="qaxbase.html#properties">QAxBase</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"/>3 signals inherited from <a href="qaxbase.html#signals">QAxBase</a></li>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"/>5 protected functions inherited from <a href="qaxbase.html#protected-functions">QAxBase</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QAxObject class provides a <a href="qobject.html">QObject</a> that wraps a COM object.</p>
<p>A QAxObject can be instantiated as an empty object, with the name of the COM object it should wrap, or with a pointer to the IUnknown that represents an existing COM object. If the COM object implements the <tt>IDispatch</tt> interface, the properties, methods and events of that object become available as Qt properties, slots and signals. The base class, <a href="qaxbase.html">QAxBase</a>, provides an API to access the COM object directly through the IUnknown pointer.</p>
<p>QAxObject is a <a href="qobject.html">QObject</a> and can be used as such, e.g&#x2e; it can be organized in an object hierarchy, receive events and connect to signals and slots.</p>
<p>QAxObject also inherits most of its ActiveX-related functionality from <a href="qaxbase.html">QAxBase</a>, notably <a href="qaxbase.html#dynamicCall">dynamicCall</a>() and <a href="qaxbase.html#querySubObject">querySubObject</a>().</p>
<p><b>Warning:</b> You can subclass QAxObject, but you cannot use the <a href="qobject.html#Q_OBJECT">Q_OBJECT</a> macro in the subclass (the generated moc-file will not compile), so you cannot add further signals, slots or properties. This limitation is due to the metaobject information generated in runtime. To work around this problem, aggregate the QAxObject as a member of the <a href="qobject.html">QObject</a> subclass.</p>
<p>See also <a href="qaxbase.html">QAxBase</a>, <a href="qaxwidget.html">QAxWidget</a>, <a href="qaxscript.html">QAxScript</a>, and <a href="activeqt.html">ActiveQt Framework</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QAxObject"></a>QAxObject::QAxObject ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates an empty COM object and propagates <i>parent</i> to the <a href="qobject.html">QObject</a> constructor. To initialize the object, call <a href="qaxbase.html#control-prop">setControl</a>.</p>
<h3 class="fn"><a name="QAxObject-2"></a>QAxObject::QAxObject ( const <a href="qstring.html">QString</a> &amp; <i>c</i>, <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qaxobject.html">QAxObject</a> that wraps the COM object <i>c</i>. <i>parent</i> is propagated to the <a href="qobject.html">QObject</a> constructor.</p>
<p>See also <a href="qaxbase.html#control-prop">setControl</a>().</p>
<h3 class="fn"><a name="QAxObject-3"></a>QAxObject::QAxObject ( IUnknown * <i>iface</i>, <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qaxobject.html">QAxObject</a> that wraps the COM object referenced by <i>iface</i>. <i>parent</i> is propagated to the <a href="qobject.html">QObject</a> constructor.</p>
<h3 class="fn"><a name="dtor.QAxObject"></a>QAxObject::~QAxObject ()</h3>
<p>Releases the COM object and destroys the <a href="qaxobject.html">QAxObject</a>, cleaning up all allocated resources.</p>
<h3 class="fn"><a name="doVerb"></a>bool QAxObject::doVerb ( const <a href="qstring.html">QString</a> &amp; <i>verb</i> )</h3>
<p>Requests the COM object to perform the action <i>verb</i>. The possible verbs are returned by <a href="qaxbase.html#verbs">verbs</a>().</p>
<p>The function returns true if the object could perform the action, otherwise returns false.</p>
<p>This function was introduced in Qt 4.1.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
